<!DOCTYPE html>
<html>
<head>
<include file="Include:meta" />
<title>任务管理-目的地运营集团数据管理平台</title>
<include file="Include:style" />
<style>
	.task_cont .task_list1{ position: static; margin: 0; padding-top: 54px; }
	.task_cont .task_list1 li{ box-shadow: none; }
	.task_cont .task_list1 li:last-child{ border: none; }
</style>
</head>
<body <if condition="$pid neq NULL"><else />style="background: #f3f3f3;"</if>>
    <div class="task_cont">
		<if condition="$pid neq NULL">
        <div class="header">
            <a class="menu_btn" href="javascript:;"><span class="sp1"></span><span class="sp2"></span><span class="sp3"></span></a>
            任务列表<a href="__APP__/Mobile/Project/task_add_task/pid/{$pid}" class="add_btn"></a>
        </div>
        <include file="Include:commu_menu" />
        <div class="pro_det_title">
            <img class="det_bg" src="__PUBLIC__/mobile/images/project/det_bg.jpg">
            <div class="txt">
                <h3> [{$project['project_num']}]</h3>
                <p>{$project['project_name']}</p>
            </div>
        </div>
        <div class="task_list task_list2">
            <ul>
				<if condition="$result eq NULL">
				<li>
                    <div class="time">暂无相关内容</div>
                </li>
				</if>
				<foreach name="result" item="vo">
                <li <if condition="$vo['status'] eq -1"><if condition="$vo['start_date'] gt $today">class="li1"<elseif condition="$vo['start_date'] elt $today and $vo['end_date'] egt $today" />class="li2"<elseif condition="$vo['end_date'] lt $today" />class="li3"</if><else />class="li4"</if>>
                    <a href="__APP__/Mobile/Project/task_detail/id/{$vo['id']}/pid/{$pid}">
                        <div class="title">
                            <h3>{$vo['name']}</h3>
                            <p><span>{$vo['order_number']}</span>{$vo['head_user']}</p>
                        </div>
                    </a>
                    <div class="time">{$vo['start_date']} ~ {$vo['end_date']} 
					<if condition="((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
						<if condition="$vo['status'] eq -1">
						<if condition="$vo['ct'] eq 0 and $vo['result_d'] neq NULL">
						<elseif condition="$vo['result_d'] eq NULL" />
						<a class="icon_edit_btn ml5" href="__APP__/Mobile/Project/task_edit_task/id/{$vo['id']}/pid/{$pid}"></a>
						<a class="icon_delete_btn" mid="{$vo['id']}" action="delete" href="javascript:void(0)"></a>
						</if>
						<elseif condition="$vo['status'] eq 1"/>
							<a class="icon_close_btn" mid="{$vo['tid']}" status="-1" state="1" href="javascript:void(0)"></a>
						</if>
					</if>
					</div>
                </li>
				</foreach>
            </ul>
        </div>
		<else />
		<div class="header" style="background: #f49900;">
			<a href="__APP__/Mobile/Index/index" class="back_btn"></a>
            任务列表
        </div>
		 <div class="task_list task_list1">
			<ul>
			<if condition="$result eq NULL">
			<li>
				<div class="time">暂无相关内容</div>
			</li>
			</if>
			<foreach name="result" item="vo">
				<li <if condition="$vo['status'] eq -1"><if condition="$vo['start_date'] gt $today">class="li1"<elseif condition="$vo['start_date'] elt $today and $vo['end_date'] egt $today" />class="li2"<elseif condition="$vo['end_date'] lt $today" />class="li3"</if><else />class="li4"</if>>
					<a href="__APP__/Mobile/Project/task_detail/id/{$vo['id']}">
						<div class="title">
							<h3>{$vo['name']}</h3>
							<p><span>{$vo['order_number']}</span>{$vo['head_user']}</p>
						</div>
					</a>
					<div class="time">{$vo['start_date']} ~ {$vo['end_date']} 
					<if condition="((((get_permission($qs,NULL,3)) and ($project['add_uid'] eq $login_id)) or (get_permission($qs,NULL,2) and (in_array($project['center_id'],$manage_id))) or (get_permission($qs,NULL,1))) or ($project['director_uid'] eq $login_id) or ($project['manager_uid'] eq $login_id)) and ($project['status'] eq 1)">
						<if condition="$vo['status'] eq -1">
						<if condition="$vo['ct'] eq 0 and $vo['result_d'] neq NULL">
						<elseif condition="$vo['result_d'] eq NULL" />
						<a class="icon_edit_btn ml5" href="__APP__/Mobile/Project/task_edit_task/id/{$vo['id']}/pid/{$pid}"></a>
						<a class="icon_delete_btn" mid="{$vo['id']}" action="delete" href="javascript:void(0)"></a>
						</if>
						<elseif condition="$vo['status'] eq 1"/>
							<a class="icon_close_btn" mid="{$vo['tid']}" status="-1" state="1" href="javascript:void(0)"></a>
						</if>
					</if>
					</div>
				</li>
			</foreach>
			</ul>
			</div>
		</if>
    </div>
<include file="Include:javascript" />
<script>
    $(function(){ 
        $('.task_list2').height($(window).height()-170);
        menu();
        $(".icon_delete_btn").ajaxModal({"body_text":"您确定要删除吗？","url":"/dms_erp/index.php?s=/Mobile/Project/task_ajax","data":{"id":"mid","action":"action"}});
        $(".icon_close_btn").ajaxModal({"body_text":"您确定要放弃提交吗？","url":"/dms_erp/index.php?s=/Index/audit_list_ajax","data":{"mid":"mid","status":"status","state":"state"}});
    })
</script>
</body>
</html>